//将本地时间转化为用于网络请求的时间
export function dateStringify(date: Date):string {
    let Y = date.getFullYear()
    let M = date.getMonth() + 1< 10 ? "0" + (date.getMonth()+ 1) : date.getMonth()+1
    let D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate()
    //获取当前的时间
    let M2 = date.getMonth() + 1;
    let D1 = date.getDate();
    let s=date.getMinutes()
    //判断是否大于10
    let h = date.getHours() < 10 ? "0" + date.getHours() : date.getHours()
    let f = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()
    //判读是否是当天
    return Y + "-"
        + M + "-"
        + D + "T" + h
        + ":" +
        f+":00"
        ;
}